package com.dongdongshop.service.impl;

import com.alibaba.dubbo.config.annotation.Service;
import com.dongdongshop.mapper.TbSellerMapper;
import com.dongdongshop.pojo.seller.TbSeller;
import com.dongdongshop.service.SellerServiceI;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

@Component
@Service
public class SellerServiceImpl implements SellerServiceI {
    @Resource
    private TbSellerMapper tbSellerMapper;

    @Override
    public String getNameById(String sellerId) {
        return tbSellerMapper.selectNameBySellerId(sellerId);
    }

    @Override
    public void toRegister(TbSeller seller) {
        tbSellerMapper.insertSelective(seller);
    }

    @Override
    public TbSeller findName(String id) {
        return tbSellerMapper.selectByPrimaryKey(id);
    }
}
